﻿<%@ Page Title="" Language="C#" MasterPageFile="~/adm/AdminMaster.Master" AutoEventWireup="true" CodeBehind="appropriates.aspx.cs" Inherits="TodayWho.adm.appropriates" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <asp:ScriptManager ID="scriptManager" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
     <asp:UpdatePanel ID="updatePanel" runat="server">
        <ContentTemplate>
            <div style="text-align:center">
        <asp:DropDownList ID="ddListCategory" runat="server" CssClass="select" AutoPostBack="true" 
            OnSelectedIndexChanged="ddListCategory_OnSelectedIndexChanged" Width="200px">
            <asp:ListItem Text="Genel" Value="1" Selected="True"></asp:ListItem>
            <asp:ListItem Text="Müzik" Value="2"></asp:ListItem>
            <asp:ListItem Text="Spor" Value="3"></asp:ListItem>
            <asp:ListItem Text="Sanat" Value="4"></asp:ListItem>
            <asp:ListItem Text="Edebiyat" Value="5"></asp:ListItem>
            <asp:ListItem Text="Tech" Value="6"></asp:ListItem>
        </asp:DropDownList>
    </div>
    
    <br />
    <br />
    <asp:GridView ID="gridViewUsers" runat="server" AutoGenerateColumns="false" 
        DataKeyNames="userId" OnRowDataBound="gridViewUsers_OnRowDataBound" OnRowCommand="gridViewUsers_OnRowCommand" >
        <Columns>
            <asp:BoundField DataField="userId"  HeaderText="User ID" />
            <asp:BoundField DataField="email"  HeaderText="Email" />
            <asp:BoundField DataField="password"  HeaderText="Password" />
            <asp:BoundField DataField="username"  HeaderText="Username" />
            <asp:BoundField DataField="signupDate"  HeaderText="Signup Date" />
            <asp:BoundField DataField="categoryName"  HeaderText="Category Name" />
            <asp:BoundField DataField="isAppropriate"  HeaderText="IsAppropriate" />
            <asp:BoundField DataField="isDisplayed"  HeaderText="IsDisplayed" />
            <asp:BoundField DataField="displayDate"  HeaderText="displayDate" />
            <asp:TemplateField HeaderText="Preview" >
                <ItemTemplate>
                    <asp:HyperLink ID="hypPreview" runat="server" Text="preview" ></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="SetDate">
                <ItemTemplate>
                    <asp:Button ID="btnSetDate" runat="server" Text="SetDate" 
                        CommandName="SetDate" CommandArgument='<%# ((GridViewRow) Container).RowIndex %>' />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        
     </asp:GridView>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="gridViewUsers" EventName="rowcommand" />
        </Triggers>
     </asp:UpdatePanel>
     
</asp:Content>
